package com.jucai.pppeiyouclient.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jucai.pppeiyouclient.R;
import com.jucai.pppeiyouclient.base.BaseActivity;
import com.jucai.pppeiyouclient.utils.ActivityCollector;

import static com.jucai.pppeiyouclient.R.id.fail_reason;

public class RegisterFailActivity extends BaseActivity {

    private TextView failReason, failToChange;

    @Override
    protected void initView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_register_fail);

        ((TextView) findViewById(R.id.common_title_text)).setText("审核不通过");
        failReason = (TextView) findViewById(fail_reason);
        failToChange = (TextView) findViewById(R.id.fail_to_change);
    }

    @Override
    protected void initData() {
        //获取失败原因信息，设置到 fail_reason
    }

    @Override
    protected void loadNetData() {

    }

    @Override
    protected void setListener() {
        findViewById(R.id.common_back).setOnClickListener(this);
        findViewById(R.id.common_home_back).setOnClickListener(this);
        failToChange.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.common_back:
                ActivityCollector.removeActivity(this);
                break;

            case R.id.common_home_back:
                startActivity(new Intent(RegisterFailActivity.this, LoginActivity.class));
                ActivityCollector.removeActivity(this);
                break;

            case R.id.fail_to_change:
                startActivity(new Intent(RegisterFailActivity.this, RegisterThirdStepActivity.class));
                ActivityCollector.removeActivity(this);
                break;
        }
    }
}
